/*
 * Created on 2005-3-26
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package nc.tb.form;


/**
 * @author zxz
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class CtlLangTools {

	public static void main(String[] args) {
	}
	
	public static String getDBDataByDesc(String Desc, String[] descs, String[] dbs){
		if(Desc==null||Desc.length()==0){
			return Desc;
		}
		for(int i=0; i<descs.length; i++){
			if(descs[i].equals(Desc)){
				return dbs[i];
			}
		}
		return Desc;
	}
	
	public static String getDescByDBData(String Db, String[] dbs, String[] descs){
		if(Db==null || Db.length()==0){
			return Db;
		}
		
		for(int i=0; i<(dbs==null?0:dbs.length); i++){
			if(dbs[i].equals(Db)){
				return descs[i];
			}
		}
		return Db;
	}
	
}
